<?php /* Smarty version 2.6.16, created on 2013-08-25 22:26:44
         compiled from ../templates/admin/blogs/editblog.tpl */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_start'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php echo '<script src="';  echo $this->_tpl_vars['siteroot'];  echo '/includes/js/admin/addblog.js" type="text/javascript"></script>'; ?>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_end'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

 <div class="contain">
 
      <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['left_menu'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
      
      <div class="right_contain">
        
         <div class="heading_box">Edit Blog</div>
         <div class="whitebox">
         <!--Message Div Start-->
         <?php if ($this->_tpl_vars['msg']): ?>
         <div class="masg_div">
           <?php echo $this->_tpl_vars['msg']; ?>

         </div>
         <?php endif; ?>
         <!--Message Div End-->
         
         <form name="frmEditBlog" id="frmEditBlog" action="" method="post" enctype="multipart/form-data">
         <input type="hidden" name="hidden_image" id="hidden_image" value="<?php echo $this->_tpl_vars['blogArray']['image']; ?>
" />
         <input type="hidden" id="page" name="page" value="<?php echo $this->_tpl_vars['page']; ?>
" />
         
         <div style="min-height:250px;">
          <!--Form Contain start-->
           
           <div class="form_fieldbox">
             
             <dl>
              <dt>Title: <span class="error">*</span></dt>
              <dd><input type="text" class="input" name="title" id="title" value="<?php echo $this->_tpl_vars['blogArray']['title']; ?>
"/></dd>
              <div class="clear"></div>
             </dl>
             
              <dl>
              <dt>&nbsp;</dt>
              <dd><?php if ($this->_tpl_vars['blogArray']['image'] != ''): ?><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/uploads/blog/<?php echo $this->_tpl_vars['blogArray']['image']; ?>
" width="72" height="72"/><?php endif; ?></dd>
              <div class="clear"></div>
             </dl>
             
             <dl>
              <dt> Image: <span class="error">*</span></dt>
              <dd><input type="file"  name="blog_image"  id="blog_image" class="input" contentEditable="false"/></dd>
              <div class="clear"></div>
             </dl>
             
             <dl>
              <dt>Introtext : <span class="error">*</span></dt>
              <dd><?php 
              	
             	include_once(INCLUDE_FCKEDITOR);
                $sBasePath 			= 	$_SERVER[ 'PHP_SELF' ] ;
                $sBasePath			=	FCKEDITOR_BASEPATH;
                $oFCKeditor 		= 	new FCKeditor('introtext');
                $oFCKeditor->BasePath 	= 	$sBasePath;
                $oFCKeditor->Height = '400' ;
                $oFCKeditor->Width = '650' ;
                $oFCKeditor->Value	=	$_POST['introtext'];						
                $oFCKeditor->Create();
               ?>
              </dd>
              <div class="clear"></div>
             </dl>
             
             <dl>
              <dt>Description : <span class="error">*</span></dt>
              <dd><?php 
              	
                $blogObj = new Model_Blogs();
              	$blog_id=base64_decode($_GET['id']);
              
			  	$blogArray=$blogObj->getblogDetailsById($blog_id);
                
             	include_once(INCLUDE_FCKEDITOR);
                $sBasePath 			= 	$_SERVER[ 'PHP_SELF' ] ;
                $sBasePath			=	FCKEDITOR_BASEPATH;
                $oFCKeditor 		= 	new FCKeditor('description');
                $oFCKeditor->BasePath 	= 	$sBasePath;
                $oFCKeditor->Height = '500' ;
                $oFCKeditor->Width = '650' ;
                $oFCKeditor->Value	=	$blogArray['description'];						
                $oFCKeditor->Create();
               ?>
              </dd>
              <div class="clear"></div>
             </dl>
             
            
             
              <dt>&nbsp;</dt>
            
              <div class="clear"></div>
             </dl>
            </div>
            
            <!--Form Contain end--> 
          
           <!--Button here start-->
           <div>
            <span><input type="submit" class="admin_btn" value="Submit" name="editblog_btn" id="editblog_btn" /></span>
            <span><input type="button" class="admin_btn" value="Cancel"  onclick="window.location='<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=blogs&page=<?php echo $_GET['page']; ?>
';"/></span>
           </div>
            <!--Button here end-->
  
         </div>
         </form>
         
         </div>
        </div>
      
      
      <!--right_contain end-->
      <div class="clear"></div>
    </div>
    
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['footer'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>